<?
	include("../includes/main_inc.php");
	
	if($_POST['Submit']){
		
			$m= new AddToDatabase();
			$m->AddPosts($_POST,$_FILES);
			$m->AddTable("affiliatePrograms");
			$m->DoStuff();
			$NewID=$m->ReturnID();
			$Message="Program Added";
		
	};
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Affiliate Bubble Administration</title>

<link href="<?=$rootdir?>css/admin.css" rel="stylesheet" type="text/css">
<script src="<?=$rootdir?>jscript/menuArray.js" language="javascript"></script>
<script src="<?=$rootdir?>jscript/clock.js" language="javascript"></script></head>

<body onLoad="funClock();">
<?php include("../includes/header.php"); ?>
<table width="100%" border="0" cellspacing="25" cellpadding="0">
<tr>
<td valign="top" width="240"><div id="menu">
  <?php include("../menu/advertsmenu.php"); ?>
</div></td>
<td align="center" valign="top">

<div id="titleCompact">
Add A Program </div>

<div id="contentCompact">

<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#E9EEF5">
<tr id="formHeader">
<td><strong>Enter details below. </strong><strong></strong></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><form name="form1" method="post" action="add.php"><?=$Message;?>
  <table width="400" border="0" cellspacing="0" cellpadding="4">
    <tr>
      <td width="95" height="30">Name:</td>
      <td colspan="3"><input name="Name" type="text" class="formFields" id="Name" size="40"></td>
    </tr>
    <tr>
      <td height="30">Description</td>
      <td colspan="3"><textarea name="Description" cols="40" class="formFields" id="Description"></textarea></td>
    </tr>
    <tr>
      <td height="30">Click Commission </td>
      <td width="86"><label>$
        <input name="CCommission" type="text" class="formFields" id="CCommission" size="5">
      </label></td>
      <td width="81">Lead Commission </td>
      <td width="106">$
        <input name="LCommission" type="text" class="formFields" id="LCommission" size="5"></td>
    </tr>
    <tr>
      <td height="30">Sale Commission:</td>
      <td colspan="3"><input name="SCommission" type="text" class="formFields" id="SCommission" size="5">
        <select name="SaleType" id="SaleType">
          <option value="%">%</option>
          <option value="$">$</option>
        </select>        </td>
    </tr>
    <tr>
      <td height="30" align="right"><input name="AutoApproval" type="checkbox" id="AutoApproval" value="Y"></td>
      <td colspan="3">Automatic Affiliate Approval</td>
    </tr>
    <tr>
      <td height="30" align="right"><input name="SendEmail" type="checkbox" id="SendEmail" value="Y"></td>
      <td colspan="3">Send Affiliate Transaction Email </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="3"><input type="submit" name="Submit" value="Add Program" class="formButtonSubmit"></td>
    </tr>
  </table>
  <br>  
  <a href="../members/search.php"></a>
</form>
</td>
</tr>
</table>

</div>

</td>
</tr>
</table>
</body>
</html>
